from flask import Flask
from flask_sqlalchemy import SQLAlchemy

db = SQLAlchemy()

#此文件声明项目中的所有实体对象
class User(db.Model):
    __tablename__='user'
    id=db.Column(db.Integer,primary_key=True)
    username=db.Column(db.String(32),unique=True)
    password=db.Column(db.String(64))
    age=db.Column(db.Integer)
    sex=db.Column(db.String(2))
    email=db.Column(db.String(64))
    phone=db.Column(db.String(32))
    address=db.Column(db.String(128))

class Dept(db.Model):
    __tablename__='dept'
    id=db.Column(db.Integer,primary_key=True)
    name=db.Column(db.String(32))
    location=db.Column(db.String(64))
    manager=db.Column(db.String(32))